package dialer.ws.base.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CurrentCallEntry entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "current_call_entry", schema = "call_center")
public class CurrentCallEntry implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1798898059754057581L;
	private Integer id;
	private Agent agent;
	private CallEntry callEntry;
	private QueueCallEntry queueCallEntry;
	private String callerid;
	private Timestamp datetimeInit;
	private String uniqueid;
	private String channelClient;
	private String hold;

	// Constructors

	/** default constructor */
	public CurrentCallEntry() {
	}

	/** minimal constructor */
	public CurrentCallEntry(Agent agent, CallEntry callEntry,
			QueueCallEntry queueCallEntry, String callerid,
			Timestamp datetimeInit) {
		this.agent = agent;
		this.callEntry = callEntry;
		this.queueCallEntry = queueCallEntry;
		this.callerid = callerid;
		this.datetimeInit = datetimeInit;
	}

	/** full constructor */
	public CurrentCallEntry(Agent agent, CallEntry callEntry,
			QueueCallEntry queueCallEntry, String callerid,
			Timestamp datetimeInit, String uniqueid, String channelClient,
			String hold) {
		this.agent = agent;
		this.callEntry = callEntry;
		this.queueCallEntry = queueCallEntry;
		this.callerid = callerid;
		this.datetimeInit = datetimeInit;
		this.uniqueid = uniqueid;
		this.channelClient = channelClient;
		this.hold = hold;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_agent", nullable = false)
	public Agent getAgent() {
		return this.agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_call_entry", nullable = false)
	public CallEntry getCallEntry() {
		return this.callEntry;
	}

	public void setCallEntry(CallEntry callEntry) {
		this.callEntry = callEntry;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_queue_call_entry", nullable = false)
	public QueueCallEntry getQueueCallEntry() {
		return this.queueCallEntry;
	}

	public void setQueueCallEntry(QueueCallEntry queueCallEntry) {
		this.queueCallEntry = queueCallEntry;
	}

	@Column(name = "callerid", nullable = false, length = 15)
	public String getCallerid() {
		return this.callerid;
	}

	public void setCallerid(String callerid) {
		this.callerid = callerid;
	}

	@Column(name = "datetime_init", nullable = false, length = 19)
	public Timestamp getDatetimeInit() {
		return this.datetimeInit;
	}

	public void setDatetimeInit(Timestamp datetimeInit) {
		this.datetimeInit = datetimeInit;
	}

	@Column(name = "uniqueid", length = 32)
	public String getUniqueid() {
		return this.uniqueid;
	}

	public void setUniqueid(String uniqueid) {
		this.uniqueid = uniqueid;
	}

	@Column(name = "ChannelClient", length = 32)
	public String getChannelClient() {
		return this.channelClient;
	}

	public void setChannelClient(String channelClient) {
		this.channelClient = channelClient;
	}

	@Column(name = "hold", length = 2)
	public String getHold() {
		return this.hold;
	}

	public void setHold(String hold) {
		this.hold = hold;
	}

}